- 安装 Composer
1 | wget https://dl.laravel-china.org/composer.phar -O /usr/local/bin/composer |
- Composer 镜像加速
- 一、全局配置
1 | composer config -g repo.packagist composer https://packagist.laravel-china.org |
- 二、局部配置(仅限当前工程使用镜像,去掉 -g 即可)
1 | composer config repo.packagist composer https://packagist.laravel-china.org |
- 全局配置信息(查看[repositories.packagist.org.url]表示当前镜像地址)
1 | composer config -gl |
- 取消镜像
1 | composer config -g --unset repos.packagist |
- 查看当前版本
1 | composer -v |
- 升级
composer
版本
1 | composer selfupdate |